<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <link rel="shortcut icon" href="newtemplatesfiles5/img/favicon.html">

    <title>转售</title>
    <link rel="stylesheet" href="asserts/css/swiper-bundle.min.css">
    <!-- Bootstrap core CSS -->
    <link href="newtemplatesfiles5/css/bootstrap.min.css" rel="stylesheet">
    <link href="newtemplatesfiles5/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="newtemplatesfiles5/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="newtemplatesfiles5/css/style.css" rel="stylesheet">
    <link href="newtemplatesfiles5/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
    <script src="newtemplatesfiles5/js/html5shiv.js"></script>
    <script src="newtemplatesfiles5/js/respond.min.js"></script>
    <![endif]-->

</head>
<body lang="en">
<section id="container" class="">
    <!--header start-->
    <div th:insert="common/student-common-header::top"></div>
    <!--header end-->
    <!--sidebar start-->
    <div th:insert="common/student-common-sidebar::#left"></div>
    <!--sidebar end-->
    <!--main content start-->
    <aside id="main-content">
        <as class="wrapper">
            <!-- page start-->
            <section class="row">
                <!--schoolCounsellor-stuEibck-left  start-->
                <div th:insert="common/student-sell-left::#student-sell-left"></div>
                <!--schoolCounsellor-stuEibck-left  end-->
                <div class="profile-info col-lg-9">
                    <!--widget start-->
                    <div class="panel">
                        <div class="bio-graph-heading">
                            <h2>我的商品信息</h2>
                        </div>
                        <div class="panel-body">
                            <tr th:each="emp:${session.allMyEbickGoodsImplList}">

                                <!--ebickgoods info start-->
                                <section class="panel post-wrap pro-box">
                                    <div class="col-lg-6">
                                        <aside>
                                            <div class="post-info">
                                                <span class="arrow-pro right"></span>
                                                <div class="panel-body">
                                                    <h1><img alt="" style="width: 40px" th:src="${emp.student.image}">
                                                        <span th:text="${emp.student.nickName}"></span></h1>
                                                    <a th:text="${emp.ebickGoods.releaseTime}"></a>
                                                    <br>
                                                    <div >
                                                        <h2><a th:text="${emp.ebickGoods.ebickID}"></a></h2>
                                                        <p>首次注册时间: <a th:text="${emp.ebick.firstRegistTime}"></a></p>
                                                    </div>
                                                    <br>
                                                    <div class="desk yellow">
                                                        <h3>
                                                            <td th:each="label:${emp.labelsList}">
                                                                <a th:text="${label}"></a>
                                                            </td>

                                                        </h3>

                                                        <p><a th:text="${emp.ebickGoods.details}"></a></p>
                                                        <br>
                                                        <h1><i class="icon-jpy"></i>
                                                            <a th:text="${emp.ebickGoods.price}" ></a>元</h1>
                                                        <a style="color: red" th:text="${emp.ebickGoods.status}"></a>
                                                    </div>
                                                    <br>
                                                    <div >
                                                        <a th:href="@{/student-toUpdateEbickGoods.do(ebickID=${emp.ebickGoods.ebickID})}">
                                                            <button id="approve" class="btn btn-sm btn-info" >修改</button>
                                                        </a>
                                                        <a th:href="@{/student-deleteEbickGoods.do(ebickID=${emp.ebickGoods.ebickID})}">
                                                            <button id="toCancel" class="btn btn-sm btn-danger" >删除</button>
                                                        </a>
                                                    </div>
                                                </div>
                                            </div>
                                        </aside>
                                    </div>
                                    <div class="col-lg-6">
                                        <aside class="post-highlight yellow v-align">
                                            <div class="panel-body text-center">
                                                <div class="swiper">
                                                    <div class="swiper-wrapper">
                                                        <td th:each="image:${emp.imagesList}">
                                                            <div class="swiper-slide">
                                                                <img width="500px" th:src="${image}">
                                                            </div>
                                                        </td>
                                                    </div>

                                                    <div class="swiper-pagination"></div>
                                                    <div class="swiper-button-prev"></div>
                                                    <div class="swiper-button-next"></div>
                                                    <div class="swiper-scrollbar"></div>
                                                </div>
                                            </div>
                                        </aside>
                                    </div>
                                </section>
                            </tr>
                        </div>
                    </div>
                </div>
            </section>
        </as>
    </aside>
</section>

</body>
<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="asserts/js/popper.min.js"></script>
<script src="asserts/js/feather.min.js"></script>
<script src="asserts/js/bootstrap.min.js"></script>
<!-- js placed at the end of the document so the pages load faster -->
<script src="newtemplatesfiles5/js/jquery.js"></script>
<script src="newtemplatesfiles5/js/bootstrap.min.js"></script>
<script src="newtemplatesfiles5/js/jquery.scrollTo.min.js"></script>
<script src="newtemplatesfiles5/js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="newtemplatesfiles5/assets/jquery-knob/js/jquery.knob.js"></script>

<!--common script for all pages-->
<script src="newtemplatesfiles5/js/common-scripts.js"></script>

<script>
    window.onload=function(){
        $("#li1").removeClass('active');
        $("#li2").addClass('active');
        $("#li3").removeClass('active');
        $("#li4").removeClass('active');
        $("#li5").removeClass('active');

    };
    //knob
    $(".knob").knob();

    function verifyLoginStatus() {
        //验证登录状态
        console.log("1");
        var message = document.getElementById("mystatus").innerText;
        console.log(message);
        if(message == '请先登录'){
            alert("请登录");
            location.href="login";
            return '1';
        }
        return '2';
    };

    function mysubmit(){
        var status = verifyLoginStatus();
        if(status == '2'){
            var form = new FormData(document.getElementById("goodsForm"));
            $.ajax({
                url:"student-uploadGoodsEbick.do",
                type:"post",
                dataType:"html",
                data:form,
                cache:false,
                processData:false,
                contentType:false,
                success: function (data) {
                    if(data=="success"){
                        alert("添加成功！");
                        location.href="";
                    }else {
                        alert(data);
                    }
                },
                error:function (data) {
                    console.log("error");
                    alert("添加失败");
                }
            })
        }
    };


</script>
<!--swiper js-->
<script src="js/swiper-bundle.min.js"> </script>
<script>
    var mySwiper = new Swiper ('.swiper', {
        direction: 'horizontal', // 垂直切换选项
        loop: true, // 循环模式选项
        autoplay: {
            delay: 3000,//3秒切换一次
        },
        // 如果需要分页器
        pagination: {
            el: '.swiper-pagination',
        },

        // 如果需要前进后退按钮
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },

        // 如果需要滚动条
        scrollbar: {
            el: '.swiper-scrollbar',
        },
    })
</script>
<style>
    .swiper {
        width: 500px;
        height: 400px;
    }
</style>
</html>
